package com.jinxiangyang.auth.server.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jinxiangyang.auth.server.entity.SysUserEntity;
import com.jinxiangyang.auth.server.mapper.SysUserMapper;
import com.jinxiangyang.auth.server.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUserEntity> implements SysUserService{

    @Autowired
    private SysUserMapper sysUserMapper;

    @Override
    public SysUserEntity selectByUsername(String username) {
        QueryWrapper<SysUserEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("username", username);
        return sysUserMapper.selectOne(queryWrapper);
    }
}
